import Vue from 'vue'
import filters from 'common/filters'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/axios'

import VueLazyload from 'vue-lazyload'

import toast from 'components/common/toast'

import placeholder from './assets/img/common/placeholder.jpg'

Vue.config.productionTip = false
// 注册全局过滤器
Object.keys(filters).forEach(k => Vue.filter(k, filters[k]));

// 新建事件总线
Vue.prototype.$bus = new Vue()

Vue.use(toast)
Vue.use(VueLazyload, {
  loading: placeholder
})

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
